<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Схема разработана Управлением актуализации и модернизации руководств по структурированным электронным медицинским документам (СЭМД) 2023 -->
<!-- Включены элементы разработанные Health Level Seven -->
<xs:schema xmlns:mif="urn:hl7-org:v3/mif" xmlns="urn:hl7-org:v3" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:hl7-org:v3" elementFormDefault="qualified" xmlns:address="urn:hl7-ru:address" xmlns:fias="urn:hl7-ru:fias" xmlns:identity="urn:hl7-ru:identity">
	<!--
*****************************************************************************************************************
* XML schema for message type POCD_MT000040.
* Generated by XMLITS version 2.0
*
* Copyright (c) 2002, 2003, 2004, 2005 Health Level Seven. All rights reserved.
*  Redistribution and use in source and binary forms, with or without
*  modification, are permitted provided that the following conditions
*  are met:
*  1. Redistributions of source code must retain the above copyright
*     notice, this list of conditions and the following disclaimer.
*  2. Redistributions in binary form must reproduce the above copyright
*     notice, this list of conditions and the following disclaimer in the
*     documentation and/or other materials provided with the distribution.
*  3. All advertising materials mentioning features or use of this software
*     must display the following acknowledgement:
*       This product includes software developed by Health Level Seven.
*  THIS SOFTWARE IS PROVIDED BY HEALTH LEVEL SEVEN, INC. AND CONTRIBUTORS "AS IS" AND
*  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
*  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
*  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
*  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
*  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
*  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
*  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
*  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
*  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
*  SUCH DAMAGE.
*
********************************************************************************************************************
	  -->
	<xs:import namespace="urn:hl7-ru:fias" schemaLocation="fias.xsd"/>
	<xs:import namespace="urn:hl7-ru:address" schemaLocation="address.xsd"/>
	<xs:import namespace="urn:hl7-ru:identity" schemaLocation="identity.xsd"/>
	<xs:include schemaLocation="coreschemas/datatypes.xsd"/>
	<xs:include schemaLocation="coreschemas/voc.xsd"/>
	<xs:include schemaLocation="coreschemas/NarrativeBlock.xsd"/>
	
	<xs:complexType name="POCD_MT000040.Custodian">
		<xs:sequence>
			<xs:element name="assignedCustodian" type="POCD_MT000040.AssignedCustodian" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>организация-владелец документа (роль)</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xs:complexType>
	<xs:complexType name="POCD_MT000040.AssignedCustodian">
		<xs:sequence>
			<xs:element name="representedCustodianOrganization" type="POCD_MT000040.CustodianOrganization" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>организация владелец-документа (организация)</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xs:complexType>
	<xs:complexType name="POCD_MT000040.CustodianOrganization">
		<xs:sequence>
			<xs:element name="id" type="II_id_org_non_NF" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>уникальный идентификатор медицинской организации</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="name" type="ON" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>наименование организации или ФИО индивидуального предпринимателя</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="telecom" type="TEL" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>телефон медицинской организации или индивидуального предпринимателя</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="addr" minOccurs="1" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>адрес медицинской организации или индивидуального предпринимателя</xs:documentation>
				</xs:annotation>
				<xs:complexType> 
					<xs:sequence>
						<xs:element name="streetAddressLine" type="adxp.streetAddressLine" minOccurs="1"
									maxOccurs="1">
							<xs:annotation>
								<xs:documentation>адрес текстом</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element ref="address:stateCode" minOccurs="1" maxOccurs="1">
							<xs:annotation>
								<xs:documentation>код субъекта РФ</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element name="postalCode" type="adxp.postalCode" minOccurs="1" maxOccurs="1">
							<xs:annotation>
								<xs:documentation>почтовый индекс</xs:documentation>
							</xs:annotation>
						</xs:element>
						<xs:element ref="fias:Address" minOccurs="1" maxOccurs="1">
							<xs:annotation>
								<xs:documentation>коды адреса по ФИАС</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:attribute name="use" use="optional" type="set_PostalAddressUse"/>
					<xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="classCode" type="EntityClassOrganization" use="required" fixed="ORG"/>
		<xs:attribute name="nullFlavor" type="NullFlavor" use="prohibited"/>
	</xs:complexType>
</xs:schema>